package com.qf.interceptor;

import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author ASUS
 * @version V1.0
 * @Project work
 * @Package com.qf.interceptor
 * @Date 2021/10/9 16:34
 */
@Component
public class TestInterceptor implements HandlerInterceptor{

    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        System.out.println("拦截前处理");
        //true代表放行
        return true;
    }
}
